from sklearn.metrics import accuracy_score, recall_score, f1_score

# 真实标签和预测标签
y_true = [0, 1, 1, 0]
y_pred = [0, 1, 0, 1]

# 计算评估指标
print("Accuracy:", accuracy_score(y_true, y_pred))
print("Recall:", recall_score(y_true, y_pred))
print("F1 Score:", f1_score(y_true, y_pred))